package com.hp.controller;


import com.hp.service.RedLockService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hp
 */
@RestController
@RequestMapping("/redis")
@Slf4j
public class RedisController {

    @Resource
    private RedLockService redLockService;


    @PostMapping("/redisLock")
    public void redisLock() {

        redLockService.buyGoods();

    }
}